<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=7" />
        <title>后台管理中心</title>
        <?php echo $this->_var['system_css']; ?>
        <?php echo $this->_var['system_js']; ?>
        <script type="text/javascript">
            $(function(){
                $("#myform").validate({
                    rules: {
                        name: "required",
                        key:"required",
                        value:"required"
                    },
                    messages: {
                        name: "配置名称不能为空",
                        key:"key不能为空，否则不能调用",
                        value:"对应的值不能为空"
                    }
                });
            })
           
        </script>
    </head>
    <body>
        <?php echo $this->fetch('message.html'); ?>
        <!--        <div class="explain-col">
                    <input type="button"  class="button" value="添加配置" id="add_setting"/>
                </div>-->
        <div class="pad-10">
            <div class="common-form">
                <form name="myform" action="<?php echo $this->_var['action']; ?>" method="post" id="myform">
                    <fieldset>
                        <legend>基本信息</legend>
                        <table width="100%"  class="table_form">
                            <tr>
                                <th width="80"> <label for="name">名称：</label></th>
                                <td class="y-bg"><input name="name" type="text" id="name" value="" class="input-text" size="30"/>添加后不可更改</td>
                            </tr>
                            <tr>
                                <th width="80">key：</th>
                                <td class="y-bg"><input name="code" type="text"  id="code" value="" class="input-text" size="20"/>添加后不可更改</td>
                            </tr>
                            <tr>
                                <th>选择所属组：</th>
                                <td class="y-bg"><select name="parent_id">
                                        <?php $_from = $this->_var['setting_group']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'group');if (count($_from)):
    foreach ($_from AS $this->_var['group']):
?>
                                        <?php if (count ( $this->_var['group']['sub'] ) > 0): ?>
                                        <?php $_from = $this->_var['group']['sub']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'sub');if (count($_from)):
    foreach ($_from AS $this->_var['sub']):
?>
                                        <option value="<?php echo $this->_var['sub']['id']; ?>"><?php echo $this->_var['sub']['name']; ?></option>
                                        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                                        <?php endif; ?>
                                        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                                    </select>添加后不可更改</td>
                            </tr>
                            <tr>
                                <th width="80">类型：</th>
                                <td class="y-bg">
                                    <select name="type">
                                        <option value="text">单行文本</option>
                                        <option value="textarea">多行文本</option>
                                        <option value="radio">单选框</option>
                                        <option value="select">下拉选择框</option>
                                        <option value="checkbox">多选框</option>
                                    </select>
                                    添加后不可更改
                                </td>
                            </tr>
                            <tr>
                                <th width="80">相对应的值：</th>
                                <td class="y-bg"><textarea style="height:50px; width:60%" id="value" cols="50" rows="2" name="value"></textarea>
                                    <p>注意：多个值仅限于：多选框，单选框，下拉选择框。</p>
                                </td>
                            </tr>

                            <tr>
                                <th width="80">排序：</th>
                                <td class="y-bg"><input name="position" type="text" value="9999" class="input-text"/></td>
                            </tr>

                            <tr align="center"><td colspan="2"><input type="submit" name="search" class="button" value="添加" /></td></tr>
                        </table>
                    </fieldset>
                </form>
            </div>
        </div>

    </body>
</html>